Ext.onReady(function(){
    var processHistoryPanel=Ext.create('component.proces.history',{
        processInstanceId: procInstId,
        minHeight:100,
        colspan:2,
		 contextPath:jypath
   });
   processHistoryPanel.setAutidStatusName(auditStatus);
   processHistoryPanel.setProcesHistoryVisible(processFlag);
   
	var fileAttachment = Ext.create('component.file.attachment',{
        objectId: id,
        imageType: "9",
        contextPath:jypath,
        colspan:2
   });
	   var fromPanelInfo = Ext.create('Ext.form.FormPanel',{
		   renderTo:Ext.getBody(),
		   titleAlign:'center',
	        title:'面积补差信息',
		    border: true,
		    layout:{
		    	type: 'table',
               columns: 2,
               tableAttrs: {　　
                   border: 1,
                   cellpadding: 5,
                   cellspacing: 1,
                   width: '95%',
                   align: 'center',
                   style: "border:1px solid gray;border-collapse:collapse;margin:0 auto;text-align:center;"
               },
               tdAttrs: {　　
                   width: '100px',
                   height: '40px',
                   style: "padding:5px",
                   valign: 'middle'
               }
		    },
		   items:[ {
					   xtype:'displayfield',
			    	   fieldLabel:'房号',
			    	   name:'combinedName'
			    	   
				},{
					 xtype:'displayfield',
			    	 fieldLabel:'合同编号',
			    	 flex:1,
			    	 name:'signCode'
				}, {
					 xtype:'displayfield',
			    	 fieldLabel:'客户名称',
			    	 flex:1,
			    	 name:'customerName'
				},{
					 xtype:'displayfield',
			    	 fieldLabel:'建筑面积',
			    	 flex:1,
			    	 name:'buildingArea'
				},{
					 xtype:'displayfield',
			    	 fieldLabel:'套内面积',
			    	 name:'roomCombox',
			    	 flex:1,
			    	 name:'innerArea'
				},{
					 xtype:'displayfield',
			    	 fieldLabel:'合同单价',
			    	 flex:1,
			    	 name:'signPrice'
				}, {
					 xtype:'displayfield',
			    	 fieldLabel:'合同总价',
			    	 flex:1,
			    	 name:'signAmount'
				} ,{
					 xtype:'displayfield',
			    	 fieldLabel:'计价面积',
			    	 name:'calculateArea'
				},{
					 xtype:'displayfield',
			    	 fieldLabel:'实测面积',
			    	 width:'200',
		             name:'measuredArea'
				}, {
					 xtype:'displayfield',
			    	 fieldLabel:'补差额',
			    	 name:'makeBalance'
				},{
					xtype : 'displayfield',
					fieldLabel : '备注',
			    	 name:'remark'
				},{
					 xtype:'displayfield',
			    	 fieldLabel:'应收日期',
				     id:'receivableDate'
				} ,{
					 xtype:'displayfield',
			    	 fieldLabel:'经办日期',
			    
				     blankText:'不能为空',
				     id:'trusteesDate'
				},{
					 xtype:'displayfield',
			    	 fieldLabel:'操作员',
			    	 flex:1,
			    	 name:'userName'
				},{
					 xtype:'displayfield',
			    	 fieldLabel:'操作时间',
			    	 flex:1,
			    	 name:'manageDate',
			    	 colspan:2
				},fileAttachment,processHistoryPanel ],		
				dockedItems: [{
		            xtype: 'toolbar',
		            dock: 'bottom',
		            ui: 'footer',
		            layout: {
		                pack: 'center'
		            },
		            items: [
		            {
						xtype: "button",
						text : "返回",
						icon : jypath + '/resources/ExtJSicons/shape_move_backwards.png',
						listeners: {
							click: function(){
								history.go(-1);
							}
						}
					}]
		        }
		        ]
		   
	   });
	   fromPanelInfo.getForm().load({
			url:jypath+'/marketing/reserveArea/loadReserveAreaDetail',
			params:{'id':id},
			success:function(form, action){
				var obj = action.result.data;
				Ext.getCmp("trusteesDate").setValue(Ext.Date.format(new Date(obj.trusteesDate),'Y-m-d'));
				Ext.getCmp("receivableDate").setValue(Ext.Date.format(new Date(obj.receivableDate),'Y-m-d'));
			},   
			failure: function(form, action) {
		        Ext.Msg.alert("加载失败", action.result.errorMessage);
		    }

		}); 
	  
});